#include <iostream>
#include <string>

void practice5_7();

struct car
{
	std::string producers;
	int produce_year;
};

//int main()
//{
//	practice7();
//	return 0;
//}

void practice5_7()
{
	using namespace std;
	cout << "How many cars do you wish to catalog? ";
	int num;
	cin >> num;
	cin.get();
	car *ps = new car[num];  // should add delete
	for (int i = 0; i < num; i++)
	{
		cout << "Car #" << (i+1) << endl;
		cout << "Please enter the make :";
		getline( cin ,(ps + i)->producers);
		cout << "Please enter the year made: ";
		cin >> (ps + i)->produce_year;
		cin.get();   //need this to get ENTER
	}
	for (int i = 0; i < num; i++)
		cout << (ps + i)->produce_year << " " <<(ps + i)->producers << endl;
	delete[] ps;
	return;
}
